package com.wiscamp.ninechapters.problems.application.dto.vo.types;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.wiscamp.ninechapters.ddd.ViewObject;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 问题类型
 */
@Data
public class QuestionTypeVO implements ViewObject {
    /**
     * 题型编号
     */
    private long typeId = 0;

    /**
     * 题型代码
     */
    private String typeCode = "";

    /**
     * 题型名称
     */
    private String typeName = "";

    /**
     * 问题模式
     */
    private int questionModeId = 0;

    /**
     * 是否有高亮提示
     */
    private boolean hasHighlight = false;

    /**
     * 是否客观题
     */
    private boolean objectiveQuestion = true;

    /**
     * 是否有选项
     */
    private boolean hasOption = false;

    /**
     * 选项数量
     */
    private int optionQuantity = 0;

    /**
     * 是否随机选项
     */
    private boolean randomOption = false;

    /**
     * 答题描述
     */
    private String answerDescription = "";

    /**
     * 答题描述语音
     */
    private String answerDescriptionAudio = "";

    /**
     * 是否确认答题
     */
    private boolean confirmAnswer = false;

    /**
     * 答案是否排序
     */
    private boolean sortAnswer = false;

    /**
     * 答案是否分组
     */
    private boolean groupAnswer = false;

    /**
     * 解析类型
     */
    private int solutionTypeId = 0;

    /**
     * 编辑器类型编号
     */
    private int editorTypeId = 0;

    /**
     * 备注
     */
    private String remark = "";

    /**
     * 是否可用
     */
    private boolean enabled = true;

    /**
     * 创建用户
     */
    private long creatorId = 0;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime creationTime;

    /**
     * 编辑用户
     */
    private long modifierId = 0;

    /**
     * 编辑时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime modificationTime;

    private String questionModeName = "";

    private String solutionTypeName = "";

    private String creatorName = "";

    private String modifierName = "";

}
